/** FASSIT (Forms of Selective Attention in Intelligent Transportation Systems)
 * Computational Creativity and Digital Media
 * Cognitive and Media Systems Group
 * Centre for Informatics and Systems of the University of Coimbra (CISUC)
 *
 * Copyright (c) 2010-2013 University of Coimbra, Portugal
 * All rights reserved.
 */
package agent.Context;

import poi.Info.Location;

/**
 * This class is used to store the Context, i.e., the Location, time of day, day
 * of week, current goal, radius and the current run id
 * 
 * @author Hernani Costa
 * @version 0.1 date: 05/11/2012
 */
public class Context {
	private Location location;
	private String timeOfDay;
	private String dayOfWeek;
	private String goal;
	private int radius;
	private int runID;

	/**
	 * ------------------------------------------------------------------------
	 * Constructor class
	 * ------------------------------------------------------------------------
	 * 
	 * @param location
	 *            - current location
	 * @param timeOfDay
	 *            - time of day
	 * @param dayOfWeek
	 *            - day of week
	 * @param goal
	 *            - current goal
	 * @param radius
	 *            - radius
	 * @param runID
	 *            - run id
	 */
	public Context(Location location, String timeOfDay, String dayOfWeek,
			String goal, int radius, int runID) {
		this.location = location;
		this.timeOfDay = timeOfDay;
		this.dayOfWeek = dayOfWeek;
		this.goal = goal;
		this.radius = radius;
		this.runID = runID;
	}

	// ------------------------------------------------------------------------
	// ------------------------GETs and SETs-----------------------------------
	// ------------------------------------------------------------------------

	public int getRunID() {
		return runID;
	}

	public int getRadius() {
		return radius;
	}

	public Location getLocation() {
		return location;
	}

	public String getTimeOfDay() {
		return timeOfDay;
	}

	public String getDayOfWeek() {
		return dayOfWeek;
	}

	public String getGoal() {
		return goal;
	}

	/**
	 * ------------------------------------------------------------------------
	 * Returns a String with the all the Context information
	 * ------------------------------------------------------------------------
	 */
	@Override
	public String toString() {
		String info = String
				.format("\tContext [location=[%f, %f], timeOfDay=%s, dayOfWeek=%s, goal=%s, radius=%d, runID=%d",
						this.location.getLatitude(),
						this.location.getLongitude(), this.getTimeOfDay(),
						this.getDayOfWeek(), this.getGoal(), this.getRadius(),
						this.getRunID());

		info += "]";
		return info;
	}

}
